package nml.mail.reg.smtp;

import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.io.File;

import nml.mail.reg.Reg;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;

public class sina_com extends Reg {

	public void reg(String username, String password) {
		long start=System.currentTimeMillis();

		String url = "https://login.sina.com.cn/signup/signup.php?entry=freemail";
		get(url);

		dr.findElement(By.name("user_name")).sendKeys(username);
		dr.findElement(By.name("password")).sendKeys(password);
		dr.findElement(By.name("password2")).sendKeys(password);

		dr.findElement(By.name("selectQid")).sendKeys("我的座右铭是？");
		dr.findElement(By.name("pwdA")).sendKeys("我不知道");

		dr.findElement(By.name("door")).click();

		System.out.println(username + "@sina.cn");

		long end = System.currentTimeMillis();
		
		
		System.out.println(end-start);
	}

	public static void main(String[] args) {

		new sina_com().reg("qq331798654", "qq3131798654");

	}

}
